// pages/movie/movie.js
import { coming_soon , Screened} from "../../utils/movie/index.js" 

Page({  
    data: {
        city:wx.getStorageSync('city'),
        hotList:[],
        isShow:true,
        isScreened:[],
        bgc:"active",
        bgc2:'active2'
    },
    // 获取正在热映列表
   ishot(){
    coming_soon().then(res=>{
        // console.log(res);
        this.setData({
            hotList:res.data.data.list,
            isShow:true,
            bgc:"active",
            bgc2:''
        })
    })
   },
//    获取即将上映列表
        isScreened(){
            Screened().then(res=>{
                // console.log(res);
                this.setData({
                    isScreened:res.data.data.list,
                    isShow:false,
                    bgc:"",
                    bgc2:"active"
                })
                
            })
        },
    onLoad(){
        this.ishot()
    }
    
})